<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> 
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
	<title>近期工作安排</title>
	<script>
	 $(document).ready(function() {
		$("#message").fadeOut(10000);
	});
	</script>
</head>

<body>
	<br>
	<c:if test="${not empty message}">
		<div id="message" class="success">${message}</div>	
	</c:if>
	
	<h4 class="prepend-top">已完成任务列表</h4>
	<table id="finishProcessTable">
		<tr>
			<th align="center">ID</th>
			<th align="center">客户名称</th>
			<th width="7%" align="center">安排人员</th>
			<th align="center">预计完成时间</th>
			<th align="center">实际完成时间</th>
		</tr>
		<c:forEach items="${finishReports}" var="report" >
			<tr>
				<td><a href="leadto/${report.reportId}">${report.reportId}</a></td>
				<td>${report.customerName}</td>
				<td>${report.assignedUser}</td>
				<td><bean:write format="yyyy-MM-dd" name="report" property="scheduleFinish"/></td>
				<td><bean:write format="yyyy-MM-dd" name="report" property="updateTime"/></td>
			</tr>
		</c:forEach>
	</table>
	
	<br>
	<br>
	<br>
	<br>
	<h4 class="prepend-top">未完成任务列表</h4>
	<a  href="exportAllExcel">导出全部未完成任务列表</a>
	<table id="finishProcessTable">
		<tr>
			<th align="center">ID</th>
			<th align="center">客户名称</th>
			<th width="7%" align="center">安排人员</th>
			<th align="center">预计完成时间</th>
			<th align="center">最新更新时间</th>
		</tr>
		<c:forEach items="${unfinishReports}" var="report" >
			<tr>
				<td><a href="leadto/${report.reportId}">${report.reportId}</a></td>
				<td>${report.customerName}</td>
				<td>${report.assignedUser}</td>
				<td><bean:write format="yyyy-MM-dd" name="report" property="scheduleFinish"/></td>
				<td><bean:write format="yyyy-MM-dd" name="report" property="updateTime"/></td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>
